package com.manage.test;

import java.util.concurrent.*;

/**
 * @author Fitch
 * 2019/8/8
 */
public class test {



    //ceshi
    public static void main(String[] args) {
        ThreadTest tc = null;
        ExecutorService es = Executors.newSingleThreadExecutor();//线程池

        for(int i=0;i<4;i++){
            final int index = i;
            es.execute(new Runnable() {
                @Override
                public void run() {
                    System.out.println("run thread:"+index);
                }
            });

        }
        es.shutdown();

    }

}
